package org.feiye.studyday21.prictice;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class StudentTest {
	public static void main(String[] args) {
		List<Student> list = new LinkedList<>();
		// list.addAll(list,new Student("王菲","女",22),new Student("张飞","男",28));
		list.add(new Student("王菲", "女", 22));
		list.add(new Student("张飞", "男", 28));
		list.add(new Student("叶飞", "男", 23));
		Collections.sort(list);
		int binarySearch = Collections.binarySearch(list, new Student("王菲", "女", 22));
		System.out.println(binarySearch);
	}

}
